package com.qiangesoft.mybatisflex.base;

import com.mybatisflex.annotation.Column;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 基类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseEntity {

    private Long createBy;

    private LocalDateTime createTime;

    private Long updateBy;

    private LocalDateTime updateTime;

    // 全局配置后可不加注解
    @Column(isLogicDelete = true)
    private Boolean deleted;

    // 全局配置后可不加注解
    @Column(version = true)
    private Integer version;

    // 全局配置后可不加注解
    @Column(tenantId = true)
    private Long tenantId;

}
